package com.gensdai.leliang.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.flyco.roundview.RoundTextView;
import com.gensdai.leliang.R;
import com.gensdai.leliang.common.bean.CategoryBean;
import com.gensdai.leliang.utils.ViewHolder;

/**
 * Created by Administrator on 2017/6/1.
 */

public class LeftTypeAdapter extends KimiraAdapter<CategoryBean> {

    LayoutInflater inflater;
    Context context;
    public LeftTypeAdapter(Context context) {
        inflater = (LayoutInflater) context
                .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        this.context = context;
    }

    @Override
    public View extralView(int position, View convertView, ViewGroup parent) {
        if (convertView == null) {
            convertView = inflater.inflate(R.layout.left_type_item,
                    null);
        }

        CategoryBean main = (CategoryBean)getItem(position);
        RoundTextView title= ViewHolder.GetChars(convertView, R.id.title);

        title.setText(main.name);
        return convertView;
    }
}
